<template>
  <div class="centerList">
    <div class="box shadow-sm border rounded bg-white mb-3">
      <div class="box-title border-bottom p-3">
        <h6 class="m-0">动态列表</h6>
      </div>
      <div v-loading="!oMoodStore.o" element-loading-text="拼命加载中" class="mainList">
        <div v-for="(item, index) in MoodList" :key="index+'1'">
          <MainmoodList @likeNumChange="likeNumChange($event, item)" :Iteminfo="item" > </MainmoodList>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import MainmoodList from '@/components/index/main_moodList.vue';

export default {
  // name: 'aboutMoodList',
  components: {
    MainmoodList,
  },
  data() {
    return {
      delStore: this.newStore(),
      oMoodStore: this.newStore,
      MoodList: [],
      moodNum: 0,
    };
  },
  created() {
    this.spost(this.oMoodStore, "/Mood/getMoodList", {
      type: 'o1', user_id: Number(this.$store.state.userInfo.userid), moodNum: this.moodNum, Moodlength: 5,
    })
      .then((res) => {
        this.MoodList = res.d.MoodList;
      });
  },
  methods: {
    likeNumChange(num, item) {
      item.likeNum = num;
    },
  },
};
</script>

<style scoped lang="scss">
.centerList{
  width: 100%;
}
.imgSHoe {
  columns: 2;
  column-gap: 1px;
  img {
    width: 100%;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    padding: 5px;
  }
}
.morehandle {
  position: relative;
  .moreBox {
    display: none;
    div {
      width: 100%;
      text-align: center;
      margin: 5% 0;
      font-size: 12px;
      color: #007bff;
    }
    div:hover {
      opacity: 0.8;
    }
    position: absolute;
    background: rgb(255, 255, 255);
    width: 200%;
    left: -162%;
    border-radius: 5%;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,
      rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  }
}
.morehandle:hover {
  .moreBox {
    display: block;
  }
}
.mainList{
  min-height: 50vh;
  max-width: 100%;
}
</style>
